package base.objectoriented;

interface Valueable{
	public double getmoney();
}

interface Protectable{
	public void beProtected();
}

abstract class Donwu{
	private String name;
	abstract void enjoy();
}

class GoldenMonkey extends Donwu implements Valueable,Protectable{
	public double getmoney(){
		return 1000;
	}
	
	public void beProtected(){
		System.out.println("live in the room");
	}
	
	public void enjoy(){
		
	}
}

interface A extends Protectable{
	void m();
}

//类继承了接口的接口，需要把所有接口的抽象方法实现
class Hen implements A{
	public void beProtected(){
		System.out.println("it is so dear");
	}
	
	public void m(){
		System.out.println("ahahha");
	}
}


public class TestInterface2 {
	public static void main(String[] args) {
		Valueable v1 = new GoldenMonkey();
		v1.getmoney();
		Protectable p1 = new GoldenMonkey();
		p1.beProtected();
		
	}
}
